/**
 * 
 */
package org.swing.utility.jdbc.thread;

/**
 * @author lqnhu
 *
 */
public abstract class Loadable {
	// Sequence is set by the pool.
	int sequence;
	protected Loader loader = Loader.getInstance(getClass());
	LoadablePool<? extends Loadable> pool;

	/**
	 * Obtains the sequence, starting from 0, of this loader.
	 *
	 * @return The sequence of this loadable.
	 */
	protected int getSequence() {
		return sequence;
	}

	public abstract String getClearStatement();

	public abstract void prepare();

	public abstract void load();

	public void postLoad() {
		// Empty. We do not make it abstract.
		// A majority of LoadObjects do not need this.
	}
}
